package br.ufrj.ppgi.greco.model.dao;

import java.util.List;

import javax.persistence.EntityManager;

import br.com.caelum.vraptor.ioc.Component;
import br.ufrj.ppgi.greco.model.entity.EntityProperty;

@Component
public class DAOProperty extends DAOGeneric<EntityProperty>
{
	
	public DAOProperty(EntityManager em)
	{
		super(em);
	}
	
	
	public String getAllPropertiesJson()
	{
		String result = "[";
		List<EntityProperty> listProperties=  this.getAll();
		for(EntityProperty prop : listProperties)
		{
			result+= "'"+prop.getUri()+"',";
		}	
		result += "]";
		
		return result;
	}
}
